#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int a, n;
    scanf("%d%d", &a, &n);
    int sum = 0;
    for (int i = 1; i <= n; i++)
    {
        int tmp = 0;
        for (int j = 1; j <= i; j++)
        {
            tmp = tmp * 10 + a;
        }
        sum += tmp;
    }
    printf("%d\n", sum);
    return 0;
}